# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=libnbcompat
pkgver=1.0.2
pkgrel=0
pkgdesc="Portable NetBSD-compatibility library"
url="https://github.com/archiecobbs/libnbcompat"
arch="all"
license="BSD-2-Clause"
makedepends="autoconf automake bash libtool"
subpackages="$pkgname-dev"
source="https://github.com/archiecobbs/libnbcompat/archive/$pkgver/libnbcompat-$pkgver.tar.gz"

prepare() {
	default_prepare

	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
2b26e6468119d53febbeb8ba92c592072559868f74024033b92c099e0c2083126edd21c5fef6ab4df8554bae64e5bbd699e282f7f34d8fbb50ddadde3644b183  libnbcompat-1.0.2.tar.gz
"
